package JAVATest;

/**
 * ClassName:Test_003
 * Package:JAVATest
 * Description:
 *
 * @Author:ZhangXin
 * @Create2023/1/10-18:30
 * @Version:v1.0
 */
public class Text_003 {
    public static void main(String[] args) {
        int []arr = {1,2,3,4,5,6,7,8,9,10};
        for (int i = 0; i <arr.length; i++) {
            if (arr[i]%2==0){
                arr[i]/=2;
            }else{
                arr[i]*=2;
            }
        }
        for (int i = 0; i <arr.length; i++) {
            System.out.println(arr[i]);
        }

    }
}
/*
* 数组的初始化
* 1.int []array={1,2,3}  简写格式
* 2.int []array=new int[]{1,2,3}   完整格式
*
* */